package com.lemon.model;

import javax.persistence.*;

@Entity
@Table(name = "T_OrderGood", schema = "LemonDb", catalog = "")
public class OrderGoodEntity {
    private int id;
    private Integer goodPrice;
    private Integer visible;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "good_price")
    public Integer getGoodPrice() {
        return goodPrice;
    }

    public void setGoodPrice(Integer goodPrice) {
        this.goodPrice = goodPrice;
    }

    @Basic
    @Column(name = "visible")
    public Integer getVisible() {
        return visible;
    }

    public void setVisible(Integer visible) {
        this.visible = visible;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        OrderGoodEntity that = (OrderGoodEntity) o;

        if (id != that.id) return false;
        if (goodPrice != null ? !goodPrice.equals(that.goodPrice) : that.goodPrice != null) return false;
        if (visible != null ? !visible.equals(that.visible) : that.visible != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (goodPrice != null ? goodPrice.hashCode() : 0);
        result = 31 * result + (visible != null ? visible.hashCode() : 0);
        return result;
    }
}
